package com.ruoyi.system.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.PmsPurchaseRequisitions;
import com.ruoyi.system.service.IPmsPrOperationLogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/pmsPrOperationLogs")
public class PmsPrOperationLogsController extends BaseController {

    @Autowired
    private IPmsPrOperationLogsService insertPmsPurchaseRequisitions;

    @PostMapping("/add")
    @Log(title = "采购申请单主", businessType = BusinessType.INSERT)
    public R<Void> add(@RequestBody PmsPurchaseRequisitions pmsPurchaseRequisitions){
        return toAjax(insertPmsPurchaseRequisitions.insertLogByBo(pmsPurchaseRequisitions));
    }
}
